package usw.minimongodb.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TaskPkg implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String		uuid;
	private	int			taskpkg_id;
	private String		taskpkg_name;

	private	long		taskpkg_size;
	private	long		taskpkg_duration;
	private	int			taskpkg_template_id;
	private	String		taskpkg_template_name;
	private	String		creator;
	private	String		owner;
	private	Date		create_time;
	private	String		strFormattedCreateTime;
	private	Date		modify_time;
	private	String		strFormattedModifyTime;
	private	int			usage_state;

	public TaskPkg()
	{
		taskpkg_name = "defaultTaskPkgName";

		taskpkg_size = 0;
		taskpkg_duration = 0;
		taskpkg_template_id = 0;
		taskpkg_template_name = "defaultTemplate";
		creator = "admin";
		owner   = "admin";
		create_time = new Date();
		modify_time = new Date();
		usage_state = 0;
	}

	//	uuid
	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	//	taskpkg_id
	public int getTaskpkg_id() {
		return taskpkg_id;
	}
	public void setTaskpkg_id(int taskpkg_id) {
		this.taskpkg_id = taskpkg_id;
	}
	
	//	taskpkg_name
	public String getTaskpkg_name() {
		return taskpkg_name;
	}
	public void setTaskpkg_name(String taskpkg_name) {
		this.taskpkg_name = taskpkg_name;
	}
	
	//	taskpkg_size
	public long getTaskpkg_size() {
		return taskpkg_size;
	}
	public void setTaskpkg_size(long taskpkg_size) {
		this.taskpkg_size = taskpkg_size;
	}
	
	//	taskpkg_duration
	public long getTaskpkg_duration() {
		return taskpkg_duration;
	}
	public void setTaskpkg_duration(long taskpkg_duration) {
		this.taskpkg_duration = taskpkg_duration;
	}
	
	//	taskpkg_template_id
	public int getTaskpkg_template_id() {
		return taskpkg_template_id;
	}
	public void setTaskpkg_template_id(int taskpkg_template_id) {
		this.taskpkg_template_id = taskpkg_template_id;
	}
	
	//	taskpkg_template_name
	public String getTaskpkg_template_name() {
		return taskpkg_template_name;
	}
	public void setTaskpkg_template_name(String taskpkg_template_name) {
		this.taskpkg_template_name = taskpkg_template_name;
	}
	
	//	creator	
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	
	//	owner
	public String getOwner() {
		return owner;
	}
	public void setOwner(String owner) {
		this.owner = owner;
	}
	
	//	create_time
	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		
		this.create_time = create_time;
		
		SimpleDateFormat myFmt = new SimpleDateFormat("yyyy年MM月dd日");
		
		this.strFormattedCreateTime = myFmt.format(create_time);
	}
	
	public String getStrFormattedCreateTime() {
		return strFormattedCreateTime;
	}
	
	//	modify_time
	public Date getModify_time() {
		return modify_time;
	}
	public void setModify_time(Date modify_time) {
		
		this.modify_time = modify_time;
		
		SimpleDateFormat myFmt = new SimpleDateFormat("yyyy年MM月dd日");
		
		this.strFormattedModifyTime = myFmt.format(modify_time);		
	}
		
	public String getStrFormattedModifyTime() {
		return strFormattedModifyTime;
	}
	
	//	usage_state
	public int getUsage_state() {
		return usage_state;
	}
	public void setUsage_state(int usage_state) {
		this.usage_state = usage_state;
	}


}
